import { EffectType } from "./const/EffectType";
import { IEffectData } from "./const/IEffectData";
import { AddBuffEffect } from "./subs/AddBuffEffect";
import { DamageEffect } from "./subs/DamageEffect";
import { DotDamageEffect } from "./subs/DotDamageEffect";
import { TreatEffect } from "./subs/TreatEffect";

/**
 * 效果生成器
 */
export class EffectCreator {

    static create(data: IEffectData) {
        switch (data.effectType) {
            case EffectType.damage:
                return new DamageEffect(data);
            case EffectType.addBuff:
                return new AddBuffEffect(data);
            case EffectType.buffDamage:
                return new DotDamageEffect(data);
            case EffectType.treate:
                return new TreatEffect(data)
        }
    }
}